#!/usr/bin/python
import sys
import unittest
import os


if __name__ == '__main__':
    SDK_PATH = os.environ['APPENGINE_SDK']
    TEST_PATH = os.path.join(os.path.dirname(__file__), 'tests')

    sys.path.insert(0, SDK_PATH)
    import dev_appserver
    dev_appserver.fix_sys_path()

    # dev-libs/protobuf contains `google' module too
    if 'google' in sys.modules:
        del sys.modules['google']

    suite = unittest.loader.TestLoader().discover(TEST_PATH)
    unittest.TextTestRunner(verbosity=2).run(suite)

